/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package explorer;

import java.util.ArrayList;
import javax.swing.ListModel;
import javax.swing.event.ListDataListener;

/**
 *
 * @author Carmen
 */
public class FileListModel implements ListModel {

    private ArrayList<FileModel> _fileList;
    
    public FileListModel() {
        _fileList = new ArrayList<FileModel>();
    }
    
    public FileListModel(ArrayList<FileModel> fileList) {
        _fileList = fileList;
    }
    
    @Override
    public int getSize() {
        return _fileList.size();
    }

    @Override
    public Object getElementAt(int index) {
        return _fileList.get(index);
    }

    @Override
    public void addListDataListener(ListDataListener l) {
    }

    @Override
    public void removeListDataListener(ListDataListener l) {
    }

    /**
     * @return the _fileList
     */
    public ArrayList<FileModel> getFileList() {
        return _fileList;
    }

    /**
     * @param fileList the _fileList to set
     */
    public void setFileList(ArrayList<FileModel> fileList) {
        this._fileList = fileList;
    }
    
    
    
}
